<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

 <fieldset class="layui-elem-field layui-field-title site-title">
			<legend><a name="fixbar" style="font-size: 16px; color: #ce2424;">班级活动</a></legend>
		</fieldset>
		<form class="layui-form" action="save" id="myForm" method="post" lay-filter="stuform">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">活动主题：</label>
			<div class="layui-input-inline">
				<input type="text" name="motif" value="${param.motif}" class="layui-input" />
			</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">活动内容：</label>
				<div class="layui-input-inline">
					<input type="text" name="content" value="${param.content}" class="layui-input" />
				</div>
				</div>
				<div class="layui-inline">
					<button type="button" class="layui-btn layui-btn-danger" onclick="search()" >查询</button>
					<button type="button" class="layui-btn layui-btn-danger" onclick="empty()" >清空</button>
				</div>
			</div>
		</form>
     
	<table id="student_table"></table>
<script type="text/html" id="toolbarDemo">
	<div class="layui-btn-container">
		<button class="layui-btn layui-btn-sm" lay-event="add_panel">新增</button>
  	</div>
</script>

	<script type="text/javascript">
		var option={
			elem:'#student_table',
			title:'学生列表',
			path:'activityClass',
			height:'full-265',
			addurl:'edit',
			where:{motif:'${param.motif}',content:'${param.content}'},
			//sort: 'name',
			//winWidth: '800px',
			toolbar:'#toolbarDemo',
			cols : [ 
				[ {
					field : 'tbClass',
					title : '班级',
					templet: function(d){return d.tbClass?d.tbClass.name:'';}
				}, {
					field : 'motif',
					title : '活动主题'
				}, {
					field : 'begintime',
					title : '开始时间'
				}, {
					field : 'overtime',
					title : '结束时间'
				}, {
					field : 'content',
					title : '活动内容'
				}, {
					field : 'summarize',
					title : '活动总结'
				},
				{fixed: 'right', title:'操作', toolbar: '#barDemo2', width:200}
				] 
			]
		}
		var currRow='${param.currRow==null?null:param.currRow}';
		var limit=${param.limit==null?'null':param.limit};
		var page=${param.page==null?'null':param.page};
		var classTable=new LayUiTable(option,currRow,limit,page);
		classTable.init();
		
		function search(){
			classTable.search();
		}
		
		function empty(){
			classTable.empty();
		}
	</script>
</body>
</html>